#!/usr/bin/python
# -*- coding: UTF-8 -*-
import time

def loggerprint(str):
	filepath = 'C:\\Users\\Administrator\\Desktop\\来文来电\\logger\\'
	filename = time1() + '.txt'
	log = open(filepath + filename, 'a',newline='')
	print(currenttime(), file=log)
	print('\r\n', file= log)
	print(str, file=log)
	print('\r\n',file=log)
	log.close()

def currenttime():
	return time.strftime("%Y-%m-%d  %H:%M:%S",time.localtime())

def time1():
	return time.strftime("%Y-%m-%d",time.localtime())

